<#assign pageTitle = "分享赚钱" />
<#assign pageHeader>
    <script type="text/javascript" src="/static/libs/jquery/jquery.qrcode.min.js"></script>
    <script>
        function wxShare(ev,urls) {
            var oEvent = ev || event;
            var oTop = oEvent.clientY;
            var clientHeight = document.documentElement.scrollTop;
            var _top = (clientHeight + oTop) / 4;
            var str = toUtf8(urls);
            $("#bd_weixin_popup").empty().qrcode({
                render: 'canvas',
                text: str,
                type: 'cn',
                width: 200,
                height: 200
            });
            $("#wx-bd-win").css('top', _top).show();
        }
        /**
         * 二维码生成
         */
        function clesWin(){
            $("#wx-bd-win").hide();
        }
        function toUtf8(str) {
            var out, i, len, c;
            out = "";
            len = str.length;
            for (i = 0; i < len; i++) {
                c = str.charCodeAt(i);
                if ((c >= 0x0001) && (c <= 0x007F)) {
                    out += str.charAt(i);
                } else if (c > 0x07FF) {
                    out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
                    out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
                    out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
                } else {
                    out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
                    out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
                }
            }
            return out;
        }
    </script>
</#assign>
<#assign pageContent>
    <article class="w80 fl">
        <div class="u-r-cont">
            <section>
                <div class="">
                    <section class="u-r-tit-all">
                        <h2 class="unFw">
                        <span class="current">
                            分享赚钱
                        </span>
                        </h2>
                    </section>
                    <div class="u-r-all-box" id="p_tCont">
                        <section class="member-all-box">
                            <div class="member-yt">
                                <div class="mem-title pr">
                                <span class="f-fM pt-pic">
                                   邀请方法一
                                </span>
                                    <div>
                                        <p class="fsize14 c-999 f-fM lain">复制您的专属链接：</p>
                                        <div class="u-o-right fr">
                                            <a href="javascript:void(0)" title="复制链接" class="cou-kscp mt5" onclick="copyContent()">复制链接</a>
                                        </div>
                                        <div class="clear"></div>
                                    </div>
                                </div>
                                <div class="mem-body">
                                    <article class="yqlj-box">
                                        <textarea class="fsize16 c-999 f-fM" id="copyContent" readonly style="width: 100%;border: 1px solid #eee" rows="3" type="text">${thisDomain}?uid=${user.userId}，启点学网校，知识众创平台合伙人招募，让你的技术创造价值，知识创作变现，快快来参与吧！</textarea>
                                    </article>
                                </div>
                            </div>
                            <div class="member-jl mt50">
                                <div class="mem-title pr">
                                <span class="f-fM pt-pic">
                                   邀请方法二
                                </span>
                                    <p class="fsize14 c-999 f-fM lain">分享到社区平台:</p>
                                </div>
                                <div class="mem-body">
                                    <ul class="u-yqpt-list clearfix">
                                        <li>
                                            <a target="_blank" href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=?msg=externalLogin&uid=${user.userId}&summary=${siteCompany.siteName!}&desc=${siteCompany.description}&title=${siteCompany.siteName!}&pics=${siteCompany.logo}" title="QQ分享">
                                                <img src="/static/qdxwx/img/QQ.png">
                                            </a>
                                            <p class="tac hLh30 fsize14 c-666 f-fM mt10">QQ分享</p>
                                        </li>
                                        <li>
                                            <a href="javascript:void(0)" onclick="wxShare(event,'${shareUrl!}')" title="微信分享">
                                                <img src="/static/qdxwx/img/weixin.png">
                                            </a>
                                            <p class="tac hLh30 fsize14 c-666 f-fM mt10">微信分享</p>
                                        </li>
                                        <li>
                                            <a target="_blank" href="http://service.weibo.com/share/share.php?url=?msg=externalLogin&uid=${user.userId}&searchPic=true&pic=${siteCompany.logo}&type=icon&language=zh_cn&title=%23${siteCompany.siteName!}%23，${siteCompany.description}" title="新浪微博">
                                                <img src="/static/qdxwx/img/weibo.png">
                                            </a>
                                            <p class="tac hLh30 fsize14 c-666 f-fM mt10">新浪微博</p>
                                        </li>
                                    </ul>

                                </div>
                                <div class="member-jl mt50">
                                    <div class="mem-title pr">
                                <span class="f-fM pt-pic">
                                   邀请记录
                                </span>
                                    </div>
                                    <div class="mem-body">
                                        <#if userInviteList??>
                                            <table class="member-jl-tab" width="100%" cellspacing="0" cellpadding="0" border="0">
                                                <thead>
                                                <tr>
                                                    <th align="center" class="mo-name">用户名</th>
                                                    <th align="center">日期</th>
                                                    <th align="center">来源</th>
                                                </tr>
                                                </thead>
                                                <tbody>
                                                <#list userInviteList as userInvite>
                                                    <tr>
                                                        <td align="center" class="mo-name">${userInvite.inviteUserName!}</td>
                                                        <td align="center">${userInvite.addTime?string("yyyy-MM-dd hh:mm")}</td>
                                                        <td align="center"><#if userInvite.registerFrom! =='WEB'>网站</#if>
                                                            <#if userInvite.registerFrom! =='ADMIN'>后台开通</#if>
                                                            <#if userInvite.registerFrom! =='THIRD'>第三方登录</#if>
                                                            <#if userInvite.registerFrom! =='WEIXIN'>微信</#if>
                                                            <#if userInvite.registerFrom! =='MOBILE'>手机</#if>
                                                        </td>
                                                    </tr>
                                                </#list>

                                                </tbody>
                                            </table>
                                            <!-- 公共分页 开始 -->
                                            <div class="paging" id="showPages"></div>
                                            <!-- 公共分页 结束 -->
                                        <#else>
                                            <section class="no-data-wrap">
                                                <em class="icon30 no-data-ico">&nbsp;</em> <span class="c-666 fsize14 ml10 vam">暂无邀请记录...</span>
                                            </section>
                                        </#if>

                                        <div class="tab-ts">
                                            <span class="tab-ts-z fsize14 f-fM c-master">说明：</span>
                                            <#if (invite.regCashback?number) gt 0>
                                                <p class="hLh30 f-fM c-666 fsize14">每邀请一个好友成功注册奖励${(invite.regCashback?number)/100}元。</p>
                                            </#if>
                                            <p class="hLh30 f-fM c-666 fsize14">所获得的奖励将直接发放到您的账户，方便站内购买商品。</p>
                                            <#if serviceSwitch.allowDraw=='ON'>
                                                <p class="hLh30 f-fM c-666 fsize14">所获得的奖励可以从您的账户中提现到您的银行卡。</p>
                                            </#if>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </section>
                    </div>
                </div>
            </section>
        </div>
    </article>
    <div id="wx-bd-win" style="height: 280px;left: 945.5px;top: 629.5px;width: 240px;border: 1px solid #d8d8d8;font-size: 12px;padding:10px;position:absolute;background:none repeat scroll 0 0 #fff;z-index:100001;display: none;">
        <div class="hLh20">
            <span class="fsize14 c-666 f-fM">分享到微信朋友圈</span>
            <a href="javascript:void(0)" onclick="clesWin()" style="float: right;font-weight:bold;font-size: 14px;">×</a>
        </div>
        <div id="bd_weixin_popup" style="text-align: center;" class="mt10">

        </div>
        <div class="bd_weixin_popup_foot mt10">
            <p class="fsize12 c-666 f-fM">打开微信，点击底部的“发现”，</p>
            <p class="fsize12 c-666 f-fM">使用“扫一扫”即可将网页分享至朋友圈。</p>
        </div>
    </div>
</#assign>
<#assign pageFooter>
    <script type="text/javascript" src="/static/js/page.js"></script>
    <script type="text/javascript">
        var options = {
            currentPage : ${page.currentPage}
            ,totalPage : ${totalPages}
        };
        $(function () {
            showPages(options);
        });

        //分享赚钱复制链接
        function copyContent() {
            var Url = document.getElementById("copyContent");
            Url.select(); // 选择对象
            document.execCommand("Copy"); // 执行浏览器复制命令
            layer.msg("复制成功！", {icon: 1});
        }
    </script>
</#assign>
<#include "../layouts/layout_uc.ftl">